<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>编辑用户</title>
  </head>
  <body>
	<div class="pageContent">
		<form method="post" action="<%=path %>/cost/saveCost.action" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<div class="pageFormContent" layoutH="56">
				<input name="costVO.id" type="hidden" value="<s:property value="costVO.id" />" />

				<p>
					<label>实例卡：</label>
					<input name="costVO.cardEntity.id" value="<s:property value="costVO.cardEntity.id" />" class="required" type="hidden" size="30" alt="请输入实例卡"/>
					<input name="costVO.cardEntity.memberName" value="<s:property value="costVO.cardEntity.memberName" />" readonly size="30" alt="请输入实例卡"/>
				</p>
				<p>
					<label>消费金额：</label>
					<input name="costVO.money" value="<s:property value="costVO.money" />" class="required" type="text" size="30" alt="请输入消费金额"/>
				</p>
				<p>
					<label>消费类型：</label>
					<select name="costVO.type">
                        <option value="">==选择类型==</option>
                        <c:forEach var="item" items="${costTypes}">
                        	<option value="${item.name}" ${costVO.type eq item.name ? "selected" : "" }>${item.title}</option>
                        </c:forEach>
                   </select>
				</p>
				<p>
					<label>商品：</label>
					<select name="costVO.product.id">
                        <option value="">==选择商品==</option>
                        <c:forEach var="item" items="${products}">
                        	<option value="${item.id}" ${costVO.product.id eq item.id ? "selected" : "" }>${item.name}</option>
                        </c:forEach>
                   </select>
				</p>
				<p>
					<label>说明：</label>
					<input name="costVO.description" value="<s:property value="costVO.description" />" type="text" size="30" alt="请输入说明"/>
				</p>
				<!-- 
				<p>
					<label>消费时间：</label>
					<input name="costVO.costDate" value="<s:property value="costVO.costDate" />" class="required" type="text" size="30" alt="请输入消费时间"/>
				</p>
				 -->
				<p>
					<label>积分：</label>
					<input name="costVO.score" value="<s:property value="costVO.score" />" class="required number" type="text" size="30" alt="请输入积分"/>
				</p>
			</div>
			<div class="formBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
					<li>
						<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
					</li>
				</ul>
			</div>
		</form>
	</div>
  </body>
</html>